import { createApp } from 'vue'

// 引入全局样式
import './style.css'

// 引入根组件
import App from './App.vue'

const dict = {
    hello: "雷猴"
}

// 基于根组件创建应用程序 并将应用程序挂载到
const app = createApp(App)

app.provide(/* 注入名 */ 'dict', /* 值 */ dict)

// 3.3以前如果想要provie-inject有响应性 就要打开这行破配置
// app.config.unwrapInjectedRef = true


/* 注册全局指令 */
import focus from './directives/focus'
app.directive(
    "focus",
    focus
)

import hover from './directives/hover'
app.directive("hover", hover)

import throttle from './directives/throttle'
app.directive("throttle", throttle)

import debounce from './directives/debounce'
app.directive("debounce", debounce)

app.mount('#app')
